package com.oj.core.proxy;

import com.oj.api.core.CoreApi;
import com.oj.api.core.domain.ProblemInfo;
import com.oj.api.core.domain.ProblemSetCategoryInfo;
import com.oj.api.core.domain.ProblemSetInfo;
import com.oj.api.core.service.IProblemSetCategoryService;
import com.oj.common.IProxyLayer;
import com.oj.common.InfoPage;
import com.oj.common.exception.BreezeeException;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Bing on 2018/5/4.
 */
@RestController
@RequestMapping("/"+ CoreApi.BEAN_PROBLEM_SET_CATEGORY_SERVICE)
public class ProblemSetCategoryServiceProxy implements IProblemSetCategoryService,IProxyLayer{

    @Resource(name = CoreApi.BEAN_PROBLEM_SET_CATEGORY_SERVICE)
    private IProblemSetCategoryService target;

    @Override
    public ProblemSetCategoryInfo saveInfo(@RequestBody ProblemSetCategoryInfo problemSetCategoryInfo) throws BreezeeException {
        return target.saveInfo(problemSetCategoryInfo);
    }

    @Override
    public ProblemSetCategoryInfo findInfoById(@PathVariable("id") String id) throws BreezeeException {
        return null;
    }

    @Override
    public List<ProblemSetCategoryInfo> listInfos(@RequestBody ProblemSetCategoryInfo problemSetCategoryInfo) {
        return target.listInfos(problemSetCategoryInfo);
    }

    @Override
    public InfoPage<ProblemSetCategoryInfo> pageInfos(@RequestBody ProblemSetCategoryInfo problemSetCategoryInfo) {
        return null;
    }

    @Override
    public void deleteInfo(@PathVariable("id") String id) throws BreezeeException {

    }

    @Override
    public ProblemInfo saveProblemInfo(@RequestBody ProblemInfo problemInfo) {
        return target.saveProblemInfo(problemInfo);
    }

    @Override
    public ProblemSetInfo findProblemSetInfo(@RequestBody ProblemSetInfo problemSetInfo) {
        return target.findProblemSetInfo(problemSetInfo);
    }

    @Override
    public List<ProblemSetInfo> findProblemSetInfos(@RequestBody ProblemSetInfo problemSetInfo) {
        return target.findProblemSetInfos(problemSetInfo);
    }

    @Override
    public ProblemInfo findProblemInfo(@PathVariable("code") String code) {
        return target.findProblemInfo(code);
    }

    @Override
    public InfoPage<ProblemInfo> findPageProblemInfos(@RequestBody ProblemInfo problemInfo) {
        return target.findPageProblemInfos(problemInfo);
    }

    @Override
    public ProblemSetInfo addProblemsToSet(@RequestBody ProblemSetInfo problemSetInfo) {
        return target.addProblemsToSet(problemSetInfo);
    }

    @Override
    public ProblemSetCategoryInfo createSet(@RequestBody ProblemSetCategoryInfo problemSetCategoryInfo) {
        return target.createSet(problemSetCategoryInfo);
    }

    @Override
    public ProblemSetInfo updateSet(@RequestBody ProblemSetInfo problemSetInfo) {
        return target.updateSet(problemSetInfo);
    }

    @Override
    public ProblemSetInfo getProblemSet(@PathVariable("code") String code) {
        return target.getProblemSet(code);
    }

}
